package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.common.core.web.page.BaseMapperPlus;
import com.piggy.logi.sys.domain.LogiGoodOrder;

import java.util.List;

/**
 * 货源订单Mapper接口
 */
public interface LogiGoodOrderMapper extends BaseMapperPlus<LogiGoodOrder> {

    default List<LogiGoodOrder> selectByParentOrderCode(Long parentId) {
        return selectList(Wrappers.<LogiGoodOrder>lambdaQuery().in(LogiGoodOrder::getParentId, parentId).orderByAsc(LogiGoodOrder::getOrderCode));
    }
}
